# PyQt的UI
from UI.MainUI1 import Ui_MainWindow
import os,sys
from PyQt6.QtWidgets import QApplication,QDialog,QMainWindow
from PyQt6.QtCore import pyqtSignal,pyqtSlot
import MainTasks1

os.environ['QT_QPA_PLATFORM'] = 'wayland'

class MainWindow(QMainWindow):
    def __init__(self,parent = None):
        super().__init__(parent)
        self.ui = Ui_MainWindow()
        # 初始化UI
        self.ui.setupUi(self)
        # self.showFullScreen()
    def on_pushButton_1_pressed(self):
        print('执行复位')
        MainTasks1.runTaskReset()
    def on_pushButton_2_pressed(self):
        print('执行任务1')
        MainTasks1.runTask1()
    def on_pushButton_3_pressed(self):
        print('执行任务2')
        MainTasks1.runTask2()
    def on_pushButton_4_pressed(self):
        print('执行急停')
        MainTasks1.taskEmergeStop()

if __name__ == "__main__":
    app = QApplication(sys.argv)
    window = MainWindow()
    window.show()
    sys.exit(app.exec())

